home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 5.9 KB | 183 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWLnkSrc.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWLNKSRC_H
- #define FWLNKSRC_H
-
- #ifndef FWLINK_H
- #include "FWLink.h"
- #endif
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWTCOLL_H
- #include "FWTColl.h"
- #endif
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODStorageUnit;
- class ODLinkSource;
- class FW_CPresentation;
- class FW_CPart;
- class FW_CCloneInfo;
- class FW_CDataInterchange;
- class FW_CPromise;
- class FW_CLinkManager;
- class FW_CPrivCreateLinkSourceCommand;
-
- //========================================================================================
- // class FW_CLinkSource
- //========================================================================================
-
- class FW_CLinkSource : public FW_CLink
- {
- public:
- FW_CLinkSource(Environment* ev,
- ODUpdateID updateID,
- FW_CPresentation* presentation);
- virtual ~ FW_CLinkSource();
-
- virtual void LinkEstablished(Environment* ev) = 0;
- virtual void ExternalizeLinkContent(Environment* ev, ODStorageUnit* linkSU) = 0;
-
- virtual void ContentUpdated(Environment* ev,
- ODUpdateID updateID,
- FW_Boolean forceUpdate = FALSE);
-
- virtual FW_Boolean HasEmbeddedFrame(Environment* ev, ODFrame* odEmbeddedFrame);
- virtual FW_Boolean IsOKtoUpdate(Environment* ev, FW_Boolean forceUpdate);
-
- virtual void BreakLink(Environment* ev);
- virtual void RestoreLink(Environment* ev, FW_CPart* part);
-
- virtual FW_CFrame* GetFrameToRevealLink(Environment* ev);
- virtual void RevealLinkSource(Environment* ev, FW_CFrame* frame);
-
- virtual void DoExternalizeLink(Environment* ev, ODStorageUnit* storageUnit,
- FW_CCloneInfo* cloneInfo) = 0;
-
- void ExternalizeLink(Environment* ev, ODStorageUnit* storageUnit,
- FW_CCloneInfo* cloneInfo);
-
- ODLinkSource* GetODLinkSource(Environment* ev) const;
- void SetODLinkSource(Environment* ev, ODLinkSource* odLinkSource);
-
- FW_Boolean IsPending(Environment* ev) const;
- ODUpdateID GetUpdateID(Environment* ev) const;
- ODUpdateID GetPendingID(Environment* ev) const;
- void SetPendingID(Environment* ev, ODUpdateID id);
-
- void ShowLinkInfo(Environment* ev, FW_CFrame* frame, FW_CLinkManager* linkMgr);
-
- void PrivLinkEstablished(Environment* ev);
- virtual void SetLinkPromise(Environment* ev, FW_CPromise* promise);
-
- FW_CPromise* GetLinkPromise(Environment* ev) const;
- FW_CPrivCreateLinkSourceCommand* PrivGetPendingCommand(Environment*) const;
-
- void PrivSetPendingCommand(Environment*, FW_CPrivCreateLinkSourceCommand* cmd);
-
-
-
- protected:
- ODLinkSource* fODLinkSource;
- ODUpdateID fUpdateID;
- FW_CDataInterchange* fDataInterchange;
- FW_CPromise* fLinkPromise;
-
- private:
- ODUpdateID fPendingID; // changeID written to link spec
- FW_CPrivCreateLinkSourceCommand* fPendingCommand;
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkSource::GetODLinkSource
- //----------------------------------------------------------------------------------------
- inline ODLinkSource* FW_CLinkSource::GetODLinkSource(Environment*) const
- {
- return fODLinkSource;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkSource::IsPending
- //----------------------------------------------------------------------------------------
- inline FW_Boolean FW_CLinkSource::IsPending(Environment*) const
- {
- return fODLinkSource == NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkSource::GetUpdateID
- //----------------------------------------------------------------------------------------
- inline ODUpdateID FW_CLinkSource::GetUpdateID(Environment*) const
- {
- return fUpdateID;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkSource::GetPendingID
- //----------------------------------------------------------------------------------------
- inline ODUpdateID FW_CLinkSource::GetPendingID(Environment*) const
- {
- return fPendingID;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkSource::SetPendingID
- //----------------------------------------------------------------------------------------
- inline void FW_CLinkSource::SetPendingID(Environment*, ODUpdateID id)
- {
- fPendingID = id;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CLinkSource::GetLinkPromise
- //---------------------------------------------------------------------------------------
- inline FW_CPromise* FW_CLinkSource::GetLinkPromise(Environment*) const
- {
- return fLinkPromise;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CLinkSource::GetPendingCommand
- //---------------------------------------------------------------------------------------
- inline FW_CPrivCreateLinkSourceCommand* FW_CLinkSource::PrivGetPendingCommand(Environment*) const
- {
- return fPendingCommand;
- }
-
-
- //---------------------------------------------------------------------------------------
- // FW_CLinkSource::SetPendingCommand
- //---------------------------------------------------------------------------------------
- inline void FW_CLinkSource::PrivSetPendingCommand(Environment*, FW_CPrivCreateLinkSourceCommand* cmd)
- {
- fPendingCommand = cmd;
- }
-
-
- #endif
-